package org.openwork.portlet.skillmanagement.service.persistence;

import com.liferay.portal.kernel.bean.PortletBeanLocatorUtil;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.exception.SystemException;

import org.openwork.portlet.skillmanagement.model.SkillCategory;

import java.util.List;


/**
 * <a href="SkillCategoryUtil.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * @author    Samuel Garcia Martinez
 * @see       SkillCategoryPersistence
 * @see       SkillCategoryPersistenceImpl
 * @generated
 */
public class SkillCategoryUtil {
    private static SkillCategoryPersistence _persistence;

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache()
     */
    public static void clearCache() {
        getPersistence().clearCache();
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#clearCache(SkillCategory)
     */
    public static void clearCache(SkillCategory skillCategory) {
        getPersistence().clearCache(skillCategory);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#countWithDynamicQuery(DynamicQuery)
     */
    public long countWithDynamicQuery(DynamicQuery dynamicQuery)
        throws SystemException {
        return getPersistence().countWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery)
     */
    public static List<SkillCategory> findWithDynamicQuery(
        DynamicQuery dynamicQuery) throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#findWithDynamicQuery(DynamicQuery, int, int)
     */
    public static List<SkillCategory> findWithDynamicQuery(
        DynamicQuery dynamicQuery, int start, int end)
        throws SystemException {
        return getPersistence().findWithDynamicQuery(dynamicQuery, start, end);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#remove(com.liferay.portal.model.BaseModel)
     */
    public static SkillCategory remove(SkillCategory skillCategory)
        throws SystemException {
        return getPersistence().remove(skillCategory);
    }

    /**
     * @see com.liferay.portal.service.persistence.BasePersistence#update(com.liferay.portal.model.BaseModel, boolean)
     */
    public static SkillCategory update(SkillCategory skillCategory,
        boolean merge) throws SystemException {
        return getPersistence().update(skillCategory, merge);
    }

    public static void cacheResult(
        org.openwork.portlet.skillmanagement.model.SkillCategory skillCategory) {
        getPersistence().cacheResult(skillCategory);
    }

    public static void cacheResult(
        java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> skillCategories) {
        getPersistence().cacheResult(skillCategories);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory create(
        long id) {
        return getPersistence().create(id);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory remove(
        long id)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchCategoryException {
        return getPersistence().remove(id);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory updateImpl(
        org.openwork.portlet.skillmanagement.model.SkillCategory skillCategory,
        boolean merge)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().updateImpl(skillCategory, merge);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory findByPrimaryKey(
        long id)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchCategoryException {
        return getPersistence().findByPrimaryKey(id);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory fetchByPrimaryKey(
        long id) throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().fetchByPrimaryKey(id);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> findByGroupId(
        long groupId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByGroupId(groupId);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> findByGroupId(
        long groupId, int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findByGroupId(groupId, start, end);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> findByGroupId(
        long groupId, int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence()
                   .findByGroupId(groupId, start, end, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory findByGroupId_First(
        long groupId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchCategoryException {
        return getPersistence().findByGroupId_First(groupId, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory findByGroupId_Last(
        long groupId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchCategoryException {
        return getPersistence().findByGroupId_Last(groupId, orderByComparator);
    }

    public static org.openwork.portlet.skillmanagement.model.SkillCategory[] findByGroupId_PrevAndNext(
        long id, long groupId,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException,
            org.openwork.portlet.skillmanagement.NoSuchCategoryException {
        return getPersistence()
                   .findByGroupId_PrevAndNext(id, groupId, orderByComparator);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> findAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll();
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> findAll(
        int start, int end)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end);
    }

    public static java.util.List<org.openwork.portlet.skillmanagement.model.SkillCategory> findAll(
        int start, int end,
        com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().findAll(start, end, orderByComparator);
    }

    public static void removeByGroupId(long groupId)
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeByGroupId(groupId);
    }

    public static void removeAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        getPersistence().removeAll();
    }

    public static int countByGroupId(long groupId)
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countByGroupId(groupId);
    }

    public static int countAll()
        throws com.liferay.portal.kernel.exception.SystemException {
        return getPersistence().countAll();
    }

    public static SkillCategoryPersistence getPersistence() {
        if (_persistence == null) {
            _persistence = (SkillCategoryPersistence) PortletBeanLocatorUtil.locate(org.openwork.portlet.skillmanagement.service.ClpSerializer.SERVLET_CONTEXT_NAME,
                    SkillCategoryPersistence.class.getName());
        }

        return _persistence;
    }

    public void setPersistence(SkillCategoryPersistence persistence) {
        _persistence = persistence;
    }
}
